#include "GameConfigWindow.h"
#include "QStyle"
#include "kaeromanager.h"

GameConfigWindow::GameConfigWindow(int width, int height)
	: QWidget(nullptr)
{
	setWindowFlag(Qt::Popup);
	resize(width, height);
	setStyleSheet("{background:black;}");
	KAeroManager::enableBlurBehindWindow(this);
	KAeroManager::extendFrameIntoClientArea(this);
}

bool GameConfigWindow::nativeEvent(const QByteArray& eventType, void* message, long* result)
{
	if (eventType == "windows_generic_MSG") {
		LRESULT lr;
		result = (long*)KAeroManager::DwmDefWindowProc(((MSG*)message)->hwnd, ((MSG*)message)->message, ((MSG*)message)->wParam, ((MSG*)message)->lParam, &lr);
	}
	return false;
}
